﻿Imports System.IO

Module 共通モジュール
    Public Dat保存Path As String
    Public モデル保存Path As String
    Public 計算結果Path As String

    Public Sub ファイル確認()
        Dim chk As Integer = 0
        'フォルダーの存在確認 System.IO.Directory.Exists()
        If System.IO.Directory.Exists("A:\Tera計算EIQAI_Data") Then Dat保存Path = "A:\Tera計算EIQAI_Data" : chk += 1
        If System.IO.Directory.Exists("B:\Tera計算EIQAI_Data") Then Dat保存Path = "B:\Tera計算EIQAI_Data" : chk += 1
        If System.IO.Directory.Exists("C:\Tera計算EIQAI_Data") Then Dat保存Path = "C:\Tera計算EIQAI_Data" : chk += 1
        If System.IO.Directory.Exists("D:\Tera計算EIQAI_Data") Then Dat保存Path = "D:\Tera計算EIQAI_Data" : chk += 1
        If System.IO.Directory.Exists("E:\Tera計算EIQAI_Data") Then Dat保存Path = "E:\Tera計算EIQAI_Data" : chk += 1
        If System.IO.Directory.Exists("F:\Tera計算EIQAI_Data") Then Dat保存Path = "F:\Tera計算EIQAI_Data" : chk += 1

        If chk = 0 Then
            MsgBox("dataディレクトリが存在しません,[Tera計算EIQAI_Data]を任意のドライブに複写")
            End
        ElseIf chk >= 2 Then
            MsgBox("dataディレクトリが複数存在します")
            End
        End If

        'ファイルパス
        モデル保存Path = Dat保存Path & "\Models"
        計算結果Path = Dat保存Path & "\計算結果"



    End Sub
End Module
